cmake_minimum_required(VERSION 3.22)
project(cmake05)
set(CMAKE_CXX_STANDARD 11)
# set(SRC main.cpp add.cpp mul.cpp)
# 搜索源文件
# aux_source_directory(${CMAKE_SOURCE_DIR} SRC)
file(GLOB SRC ${PROJECT_SOURCE_DIR}/*.cpp)
# 添加头文件
include_directories(${PROJECT_SOURCE_DIR}/include)
# message("## cmake_current_source_dir" ${CMAKE_CURRENT_SOURCE_DIR})
message("## PROJECT_SOURCE_DIR" ${PROJECT_SOURCE_DIR})
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
# set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/outputLib)
# 引用非系统静态库设置路径
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/lib2)
# 引用库
link_libraries(calc)

add_executable(app ${SRC})
# 生成库，STATIC静态库 SHARED 动态库
# add_library(calc STATIC ${SRC})